package com.aidex.biz.service.impl;

import com.aidex.biz.domain.ZifangPush;
import com.aidex.biz.mapper.ZifangPushMapper;
import com.aidex.biz.service.ZifangPushService;
import com.aidex.common.annotation.DataScope;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.common.utils.NumberUtils;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 资方进件日志Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-01-03
 */
@Service
@Transactional(readOnly = true)
public class ZifangPushServiceImpl extends BaseServiceImpl<ZifangPushMapper, ZifangPush> implements ZifangPushService
{
    private static final Logger log = LoggerFactory.getLogger(ZifangPushServiceImpl.class);

    /**
     * 获取单条数据
     * @param zifangPush 资方进件日志
     * @return 资方进件日志
     */
    @Override
    public ZifangPush get(ZifangPush zifangPush)
    {
        ZifangPush dto = super.get(zifangPush);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 资方进件日志id
     * @return 资方进件日志
     */
    @Override
    public ZifangPush get(String id)
    {
        ZifangPush dto = super.get(id);
        return dto;
    }


    /**
     * 查询资方进件日志列表
     * @param zifangPush 资方进件日志
     * @return 资方进件日志
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<ZifangPush> findList(ZifangPush zifangPush)
    {
        return super.findList(zifangPush);
    }

    /**
     * 分页查询资方进件日志列表
     * @param zifangPush 资方进件日志
     * @return 资方进件日志
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<ZifangPush> findPage(ZifangPush zifangPush)
    {
        return super.findPage(zifangPush);
    }

    /**
     * 保存资方进件日志
     * @param zifangPush
     * @return 结果
     */
    @Override
    public boolean save(ZifangPush zifangPush)
    {
        return super.save(zifangPush);
    }


    /**
     * 删除资方进件日志信息
     * @param zifangPush
     * @return 结果
     */
    @Override
    public boolean remove(ZifangPush zifangPush)
    {
        return super.remove(zifangPush);
    }

    /**
     * 批量删除资方进件日志
     * @param ids 需要删除的资方进件日志ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteZifangPushByIds(String[] ids)
    {
        return mapper.deleteZifangPushByIds(ids);
    }

    /**
     * 获取最大编号
     * @param zifangPush 资方进件日志
     * @return 结果
     */
    @Override
    public int findMaxSort(ZifangPush zifangPush)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(zifangPush));
    }
}
